using UnityEngine;
using QFramework;
using System.Collections.Generic;

namespace Projectsurviva
{
	public partial class BasketBallAbliti : ViewController
	{
		private List<Ball> mballs= new List<Ball>();
		void Start()
		{
			void CreatBall()
			{
                mballs.Add(Ball.Instantiate().SyncPosition2DFrom(this).Show());

            }
			void CreatBalls()
			{
                var ballcount = Global.BasketBallcount.Value + Global.AdditionalFlyThinigCount.Value - mballs.Count;

                 
                for (global::System.Int32 i = 0; i < ballcount; i++)
                {
                    CreatBall();
                }
            }
            Global.BasketBallcount.Or(Global.AdditionalFlyThinigCount)
                . Register(CreatBalls)
                .UnRegisterWhenGameObjectDestroyed(gameObject);
			CreatBalls();
            // Code Here
        }
	}
}
